# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: hexchian <i at hexchain dot org>

pkgname=crun
pkgver=1.12
pkgrel=1
pkgdesc="A fast and lightweight fully featured OCI runtime and C library for running containers"
url="https://github.com/containers/crun"
license=('LGPL')
arch=('loong64' 'x86_64')
provides=('oci-runtime')
depends=('yajl' 'systemd-libs' 'libcap' 'libseccomp' 'criu')
makedepends=('libtool' 'python' 'go-md2man' 'systemd' 'git')
source=("https://github.com/containers/crun/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"{,.asc})
validpgpkeys=('AC404C1C0BF735C63FF4D562263D6DF2E163E1EA')
sha256sums=('860f4d1972dd2fdb17e4a1aae4386c4da2989e547d1e17f909b3ca0aff135c28'
            'SKIP')

build() {
    cd "$pkgname-$pkgver"
    ./autogen.sh
    ./configure \
        --prefix=/usr \
        --enable-shared \
        --enable-dynamic \
        --with-python-bindings
    make
}

package() {
    cd "$pkgname-$pkgver"
    make DESTDIR="$pkgdir" install
}
